package com.fqgj.xjd.user.client.enums;

/**
 * Created by linchengyu on 17/3/10.
 */
public enum FrozenCodeEnum {

    FROZEN("00001", "Account Freeze"),
    FACE_RECONGNITION("00002", "Face recognition Freeze"), //人脸识别冻结
    BORROW_REJECT("00003", "Loans Freeze"),//借款被拒绝冷冻
    EVALUATE_REJECT("00004", "Quota freeze"),
    REPAYMENT_OVERDUE("00005", "Repayment Overdue"),// 逾期还款
    FIRST_RISK_FROZEN("00006", "first risk frozen");// 第一次冷冻

    private String code;

    private String desc;

    FrozenCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public FrozenCodeEnum setCode(String code) {
        this.code = code;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public FrozenCodeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static FrozenCodeEnum getEnumByCode(String code) {
        FrozenCodeEnum frozenCodeEnum = null;

        for (FrozenCodeEnum b : FrozenCodeEnum.values()) {
            if (b.getCode().equals(code)) {
                frozenCodeEnum = b;
            }
        }
        return frozenCodeEnum;
    }
}
